﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ReconSite.Master" AutoEventWireup="true" CodeBehind="DiscountPenaltyMaintenance.aspx.cs" Inherits="ReconUI.DiscountPenaltyMaintenance" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleHolder" runat="server">  
    <title>Discount/Penalty Master</title>        
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="BodyHolder" runat="server">
    <div class="formDiv" style="width:72%">
    <h2 class="formTitle">Discount/Penalty Master</h2>
    <h1 class="formError" style="text-align:right;font-size:smaller;color:#CC2900;">Fields marked with * are mandatory</h1>
	<%--<span id="mandatoryMessage" class="formError">Fields marked with * are mandatory</span>--%>
    <table cellspacing="1" cellpadding="1" border="0" width = "100%">
    <tr>
            <td  align="right" >
                Discount/Penalty
            </td>
            <td>
       <asp:RadioButtonList ID="rbOption" runat="server" RepeatDirection="Horizontal" 
                    RepeatLayout="Flow">
                    <asp:ListItem Value="D" Selected="True">Discount</asp:ListItem>
                    <asp:ListItem Value="P">Penalty</asp:ListItem>
                    </asp:RadioButtonList>
             </td>
    </tr>
<%--<asp:Panel ID="pnlStatement" runat="server" Visible ="false">--%>
                
        <tr>
            <td  align="right" style="width:18%">
                Customer ID<span class="required">*</span>
            </td>
            <td colspan="3">
            
            <asp:DropDownList ID="ddlCustomer" runat="server" Width = "300" >
                    <asp:ListItem Value="0">Please Select Customer</asp:ListItem>                    
                </asp:DropDownList>            
                <asp:RequiredFieldValidator ID="reqCustomerId" runat="server" 
                    ErrorMessage="Select Customer ID." CssClass="formError"
                    ControlToValidate="ddlCustomer"  SetFocusOnError="True"></asp:RequiredFieldValidator>                    
            </td>
           
        </tr>        
        <tr>
            <td  align="right" style="width:18%; padding-bottom:12px">
                Effective Date<span class="required">*</span>
            </td>
            
            <td>
                <input id="txtEffectiveDt" size="20" style="width: 125px" type="text" 
                    runat="server" enableviewstate="false"  readonly="readonly" />
                                        <asp:Button ID="Button1" runat="server" Text="..." UseSubmitBehavior="False" CausesValidation="False"
                                            OnClick="Button1_Click1" />
                                            <asp:RequiredFieldValidator ID="reqEffectiveDt" 
                    runat="server" ErrorMessage="Effective Date is mandatory" CssClass="formError"
                    ControlToValidate="txtEffectiveDt"  SetFocusOnError="True"></asp:RequiredFieldValidator>
               
                               
            </td>           
        </tr>  
        <tr>
            <td  align="right" style="width:18%">
                Day Start
            </td>
            <td >

               <asp:TextBox ID="txtDayStart" runat="server" MaxLength="4" ></asp:TextBox>
               <asp:RegularExpressionValidator ID="regDayStart" runat="server" 
                     ErrorMessage="Enter valid value." CssClass="formError"
                    ControlToValidate="txtDayStart" SetFocusOnError="True" 
                    ValidationExpression="^[0-9]{1,4}$"></asp:RegularExpressionValidator>
            </td>  
            <td  align="right">
                Day End
            </td>
              <td>
                 <asp:TextBox ID="txtDayEnd" runat="server" MaxLength="4" ></asp:TextBox>
                <asp:RegularExpressionValidator ID="regDayEnd" runat="server" 
                     ErrorMessage="Enter valid value." CssClass="formError"
                    ControlToValidate="txtDayEnd" SetFocusOnError="True" 
                    ValidationExpression="^[0-9]{1,4}$"></asp:RegularExpressionValidator>               
            </td>         
        </tr>
       
      
         <tr>
            <td  align="right" style="width:18%; padding-bottom:12px">
                Discount/Penalty %<span class="required">*</span>
            </td>
            <td colspan="3">
                 <asp:TextBox ID="txtPercentage" runat="server" MaxLength="6" ></asp:TextBox>  
                 <asp:RequiredFieldValidator ID="reqPercentage" runat="server" 
                     ErrorMessage="Percentage is mandatory" CssClass="formError"
                    ControlToValidate="txtPercentage" SetFocusOnError="True" 
                        ></asp:RequiredFieldValidator>    
                &nbsp;<asp:RegularExpressionValidator ID="regPercentage" runat="server" 
                     ErrorMessage="Invalid Percentage" CssClass="formError"
                    ControlToValidate="txtPercentage" SetFocusOnError="True" 
                    ValidationExpression="^[0-9.]{1,6}$"></asp:RegularExpressionValidator>         
            </td>  
        </tr>
        
        <tr>
            <td  align="right" style="width:18%; padding-bottom:12px">
               Minimum Amount
            </td>
            <td>
                 <asp:TextBox ID="txtMinAmount" runat="server" MaxLength="13" ></asp:TextBox>   
                    
                    <asp:RequiredFieldValidator ID="reqMinAmount" runat="server" 
                     ErrorMessage="Minimum Amount is mandatory" CssClass="formError"
                    ControlToValidate="txtMinAmount" SetFocusOnError="True" 
                        ></asp:RequiredFieldValidator>  
                &nbsp;<asp:RegularExpressionValidator ID="regMinAmount" runat="server" 
                     ErrorMessage="Invalid Amount" CssClass="formError"
                    ControlToValidate="txtMinAmount" SetFocusOnError="True" 
                    ValidationExpression="^[0-9.]{1,12}$"></asp:RegularExpressionValidator>   
                         
            </td>   
            <td  align="right" style="width:18%; padding-bottom:12px" >
               Maximum Amount
            </td>
            <td>
                 <asp:TextBox ID="txtMaxAmount" runat="server" MaxLength="13" ></asp:TextBox>   
                    <asp:RequiredFieldValidator ID="reqMaxAmount" runat="server" 
                     ErrorMessage="Maximum Amount is mandatory" CssClass="formError"
                    ControlToValidate="txtMaxAmount" SetFocusOnError="True" 
                        ></asp:RequiredFieldValidator>  
                &nbsp;<asp:RegularExpressionValidator ID="regMaxAmount" runat="server" 
                     ErrorMessage="Invalid Amount" CssClass="formError"
                    ControlToValidate="txtMaxAmount" SetFocusOnError="True" 
                    ValidationExpression="^[0-9.]{1,12}$"></asp:RegularExpressionValidator>   
                         
            </td>                     
        </tr>
     
        <tr>
            <td  align="right">
                &nbsp;
            </td>
            <td colspan="3">
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" onclick="btnSubmit_Click"/>&nbsp;
                <asp:Button ID="btnCancel" runat="server" Text="Reset"  CausesValidation="False" onclick="btnCancel_Click" />
            </td>
        </tr>
</table>
           
     <asp:UpdatePanel ID="upUnmatchedLists" runat="server" UpdateMode="Conditional">
        <ContentTemplate>    
                <div id="pnlMatchList" runat="server" class="pnlMatchList">    
                    <span style="azimuth: center;">
                        <div id="Div1" class="formDiv" runat ="server"  >
                            <center>
                                <asp:Label ID="lblMessage" runat="server"    CssClass="lable"/>
                            </center>
                        </div>
                    </span>
                    <div class="formDiv" style="width: 30%;">
                         <center>
                            <asp:Button ID="btnok" runat="server" Text="OK" onclick="btnok_Click" CausesValidation="False"  />
                          </center>
                    </div>
                </div>
            <div style="display: none">
                <asp:Button ID="btnManualPopup" runat="server" />
            </div>
            <ajax:ModalPopupExtender ID="btnClickPopup" runat="server" PopupControlID="pnlMatchList"
                TargetControlID="btnManualPopup" BackgroundCssClass="modalBackground" RepositionMode="RepositionOnWindowScroll" OkControlID = "btnok">
            </ajax:ModalPopupExtender>   
        </ContentTemplate>        
    </asp:UpdatePanel>
                  </div>





</asp:Content>
